{% extends "teacher/teacher.html" %}

{% block app_content %}
    <div class="container mb-4"></div>
    {% if course_tables %}
    {% for course_table in course_tables %}
    <div class="container mb-5">
    <hr>
    <p class="lead"><strong>课程号：</strong>{{ course_table[0].CourseNum }}</p>
    <p class="lead"><strong>课程名：</strong>{{ course_table[0].CourseName }}</p>
    <p class="lead"><strong>选课人数：</strong>{{ course_table[0].CourseStudents }}</p>
    <table class="table table-striped table-hover">
        <thead class="thead-dark">
        <tr>
           <th class="lead">学号</th>
           <th class="lead">姓名</th>
           <th class="lead">性别</th>
           <th class="lead">学院</th>
           <th class="lead">专业</th>
        </tr>
        </thead>
        <tbody>
        {% if course_table[1] %}
        {% for table in course_table[1] %}
        <tr>
           <td class="lead">{{ table.StudentNum }}</td>
           <td class="lead">{{ table.StudentName }}</td>
           <td class="lead">{{ table.StudentSex }}</td>
           <td class="lead">{{ table.DeptName }}</td>
           <td class="lead">{{ table.MajorName }}</td>
        </tr>
        {% endfor %}
        {% endif %}
        </tbody>
    </table>
    </div>
    {% endfor %}
    {% endif %}
{% endblock %}
